import Vue from 'vue'
import App from './App'
import baseUrl from '@/common/baseUrl';
import uView from "uview-ui"
Vue.use(uView)

// 引用分享
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)

import store from './store/index';
Vue.prototype.$store = store;


function ftpUrl(url){
	if (url.startsWith('http://') || url.startsWith('https://')) return url;
	return baseUrl.imageUrl + url;
}
Vue.prototype.$ftpUrl= ftpUrl;


function url(url){
	if (url.startsWith('http://') || url.startsWith('https://')) return url;
	return baseUrl.url + url;
}
Vue.prototype.$url= url;

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})


import httpInterceptor from 'common/http.js'
Vue.use(httpInterceptor,app)


import httpApi from 'common/api.js'

Vue.use(httpApi, app)




app.$mount()



